SA1D = [1    5   47;
    2   7  156;
    3   7  234;
    4   5  140;
    5   5  125;
    6   5  109]

SA1S = [1   9   172;
    2   14  780;
    3   11  1061;
    4   17  905;  
    5   20  2200;
    6   17  1888]

SA2D = [1    7   7070;
    2   18  3937;
    3   17  4457;
    4   16  4730;
    5   26   3235;
    6   18   4270]

SA2S = [1   16   1459;
    2   38  17521;
    3   52  63121;
    4   79  170902;
    5   21  237552;
    6   27  10664]

SA3D = [1    15   1254;
    2   53  149103]

E = [12 267;
     203  15099;
     Inf Inf];

figure;
hold on;
xlabel('Horizon', 'FontSize', 24);
ylabel('Node Number', 'FontSize', 24);
title('Inventory Control', 'FontSize', 24);
set(gca,'XTick',1:1:6);
 %axes('FontSize', 20);
plot(1:6, SA1D(:,2), '--b*');
plot(1:6, SA1S(:,2), ':bo');
plot(1:6, SA2D(:,2), '--k*','linewidth',2);
plot(1:6, SA2S(:,2), ':ko','linewidth',2);
plot(1:2, SA3D(:,2), '-g*');
plot(1:3, E(:,1), '-.b^');

legend('1S,1A, DD ','1S ,1A, SD ', '2S,2A,DD','2S, 2A, SD', '3S,3A, DD','1S,1A,no pruning', 6, 'FontSize', 20);
hold off;


%%

figure;
semilogy(iter,time(:,1), '--r*');
hold on;
semilogy(iter,time(:,2), '-bo');
semilogy(iter(1:3),E(:,2), '-.ks');
xlabel('Horizon', 'FontSize', 16);
ylabel('Time(ms)', 'FontSize', 16);
%title('Inventory Control', 'FontSize', 16);
set(gca,'XTick',1:1:6);
legend('1 state - 1 action', '2 states - 2 actions', '1 state/action - no pruning', 3);
hold off;